#include <bits/stdc++.h>

#define ll long long
const int INF = 1e9;
using namespace std;

void solve()
{
    int n = 0;
    cin >> n;
    vector<int> a(n + 1, 0);
    for (int i = 1; i <= n; i++)
    {
        cin >> a[i];
        if (a[i] < 0)
        {
            a[i] = -a[i];
        }
    }
    int mid = a[1];
    sort(a.begin() + 1, a.end());
    if (a[n / 2 + 1] < mid)
    {
        cout << "NO" << endl;
    }
    else
    {
        cout << "YES" << endl;
    }
}